Hide Page by Country
Using Jamroom
So you need to fine tune:
* You dont want to block the whole ip range from VISITING the site, just from visiting the /user/signup /user/login pages
right?
My first thought is a module that listens for those pages and blocks using "Events and Listeners"
Docs: "Events and Listeners"
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1011/events-and-listeners
That would be the cleanest. Put a switch in a listener and it would be easy to add any additional pages you liked.
This is the listener from the jrBanned module:
function jrBanned_parse_url_listener($_data, $_user, $_conf, $_args, $event)
{
if (jrCore_get_config_value('jrBanned', 'auto_block', 'off') === 'on') {
if (jrBanned_is_honeypot_url($_data['_uri'])) {
header('HTTP/1.0 403 Forbidden');
jrCore_notice('error', 'You do not have permission to access this server', false);
exit;
}
}
return $_data;
}
You could use the same inner code if the IP matches your range.
The code to get their ip is